﻿using Microsoft.EntityFrameworkCore;

namespace EntityMode
{
  public  class PWSDbcontext:DbContext
    {
       public PWSDbcontext(DbContextOptions<PWSDbcontext> opts) : base(opts)
        {

        }
        public DbSet<Employee> employee { get; set; }
        public DbSet<Interview> interview { get; set; }
        public DbSet<People> people { get; set; }
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<People>().HasData([
                new People()
                {
                    Age = 16,
                    Gender = true,
                    FirstName = "张",
                    LastName = "三",
                }
            ]);
        }

    }
}
